﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="ViewBranch.aspx.cs" Inherits="ViewBranch" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <h1>View Branch</h1>
    <asp:HyperLink ID="HyperLink3" runat="server"
        NavigateUrl="~/Admin/Branch/NewBranch.aspx">New Branch</asp:HyperLink>
    &nbsp;|
    <asp:HyperLink ID="HyperLink2" runat="server"
        NavigateUrl="~/Admin/Branch/ViewBranch.aspx">View Branch</asp:HyperLink>
    <br />
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
            CellPadding="4" DataKeyNames="ID" DataSourceID="SqlDataSource1"
            ForeColor="#333333" AllowSorting="True" Width="100%" OnRowCommand="GridView1_RowCommand"
            onselectedindexchanged="GridView1_SelectedIndexChanged">

            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True"
                    SortExpression="ID" />
                <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                <asp:BoundField DataField="Address" HeaderText="Address"
                    SortExpression="Address" />
                <asp:BoundField DataField="Country" HeaderText="Country"
                    SortExpression="Country" />
                <asp:HyperLinkField DataNavigateUrlFields="ID"
                    DataNavigateUrlFormatString="./EditBranch.aspx?id={0}" Text="Edit" />
              <%--  <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="btnDel" runat="server" CommandName="Del" CommandArgument='<%# Eval("ID") %>' Text="Delete" OnClientClick="return confirm('Do you confirm to delete this type?')"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>--%>
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:MailSystem32ConnectionString %>"
            SelectCommand="SELECT * FROM [vBranch]"></asp:SqlDataSource>
    </p>
</asp:Content>

